﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.History
{
    [NHibernateEntity(Table = "ContractProductHistory")]
    public class ContractProductHistory : ILegacy
    {
        public ContractProductHistory() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [BelongsTo(Column = "ID_ContractHistory")]
        public virtual ContractHistory ContractHistory { get; set; }


        [BelongsTo(Column = "ID_Contract")]
        public virtual Contract Contract { get; set; }

        [BelongsTo(Column = "ID_Currency")]
        public virtual Currency Currency { get; set; }

        [BelongsTo(Column = "ID_Account")]
        public virtual Account Account { get; set; }

        [BelongsTo(Column = "ID_Product")]
        public virtual Product Product { get; set; }

        [Property]
        public virtual double GrossValue { get; set; }

        [Property]
        public virtual double InsuredValue { get; set; }


        [Property]
        public virtual double ExtraPremiumMedical { get; set; }

        [Property]
        public virtual double ExtraPremiumProfessional { get; set; }

        [Property]
        public virtual double ExtraPremiumOther { get; set; }

        [Property]
        public virtual int YearDuration { get; set; }


        [Property]
        public virtual DateTime StartDate { get; set; }

        [Property]
        public virtual DateTime? EndDate { get; set; }


        [Property]
        public virtual string LegacyApplication { get; set; }

        [Property]
        public virtual string LegacyID { get; set; }


    }
}
